package com.shangsheng.service.impl;

import com.shangsheng.dao.UserProfileDao;
import com.shangsheng.entity.UserProfile;
import com.shangsheng.service.UserServiceProfile;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Transactional
@Service
public class UserServiceProfileImpl implements UserServiceProfile{

    @Autowired
    private UserProfileDao userProfileDao;

    @Override
    public List<UserProfile> findAll() {
        return userProfileDao.findAll();
    }

    @Override
    public UserProfile findById(int id) {
        return userProfileDao.findById(id);
    }

    @Override
    public UserProfile findByType(String type) {
        return userProfileDao.findByType(type);
    }
}
